#include "sdlcursesio.h"
#include "game.h"

int main( int argc, char* argv[] )
{
    SDLCursesIO io;
    Game g( io );
    g.Run();
    return 0;
}




// SaveNode testing
/*
#include "save.h"
class Foo;
class Bar;
class Der;

class Foo : public Save::Node {
public:

    Foo() { }
    NODE_TYPE( Foo ) {
        DATA( _someBarPointers );
        DATA( _someData );
    }

    std::vector< Bar* > _someBarPointers;
    int                 _someData;

};

class Bar : public Save::Node {
public:

    Bar() { }
    NODE_TYPE( Bar ) {
        DATA( _fooPointer );
        DATA( _someData );
    }

    Foo* _fooPointer;
    int  _someData;

};

class Der : public Bar {
public:

    Der() { }
    NODE_TYPE( Der ) {
        PARENT( Bar );
        DATA( _moreData );
        DATA( _containedFoo );
    }

    std::string _moreData;
    Foo         _containedFoo;

};

int main( int argc, char* argv[] )
{
    Save::RegisterNodeType< Foo >();
    Save::RegisterNodeType< Bar >();
    Save::RegisterNodeType< Der >();

    // Some example objects
    Bar b1;
    Bar b2;
    Foo f;
    Der d;

    // Some example data
    b1._someData = 12;
    b1._fooPointer = &f;
    b2._someData = 100;
    b2._fooPointer = &f;

    d._fooPointer = &f;
    d._someData = 12345;
    d._moreData = "blah!";
    d._containedFoo._someData = 101;
    d._containedFoo._someBarPointers.push_back( &d );

    f._someData = 99;
    f._someBarPointers.push_back( &b1 );
    f._someBarPointers.push_back( &b2 );
    f._someBarPointers.push_back( &d );

    // Write everything out, using the Foo object as
    // a starting point
    std::ofstream file( "test.txt" );
    Save::SaveGraph( file, &f );
    file.close();

    std::ifstream file2( "test.txt" );
    Save::Node* fnew = Save::LoadGraph( file2 );
    file2.close();
    // Now the entire set of objects have been replicated
    // and fnew points to the new Foo object

    // Check that it writes the same thing out again
    std::ofstream file3( "test2.txt" );
    Save::SaveGraph( file3, fnew );
    file3.close();

    Save::UnregisterNodeTypes();
}*/
